import Vue from 'vue'
import VueRouter from 'vue-router'

import Login from '@/views/login/index'
import Layout from '@/views/layout/index'
import Dashboard from '@/views/dashboard/index'
import Article from '@/views/article/index'
Vue.use(VueRouter)

const routes = [
  {path:'/login',component: Login},
  {
    path:'/',
    component: Layout,
    // redirect:'/dashboard',
   children:[
    {path:'/dashboard',component: Dashboard},
    {path:'/article',component: Article}
   ]
  },
]

const router = new VueRouter({
  routes
})

export default router
